package logic

import (
	"context"
	"elem_svc/models/mysql"

	"elem_svc/elem"
	"elem_svc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type ShopNameDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewShopNameDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShopNameDelLogic {
	return &ShopNameDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 商品删除
func (l *ShopNameDelLogic) ShopNameDel(in *elem.ShopNameDelRequest) (*elem.ShopNameDelResponse, error) {
	// todo: add your logic here and delete this line

	mysql.DB.Debug().Where("id = ?", in.Id).Delete(&mysql.ShopName{})

	return &elem.ShopNameDelResponse{}, nil
}
